import { Pipe, PipeTransform } from "@angular/core";

@Pipe({
  name: "toFixed"
})
export class ToFixedPipe implements PipeTransform {
  transform(value: any, args?: any): any {
    value = String(value);

    // for mask
    value = value.replace(/_/, 0);

    return Number(value).toFixed(args);
  }
}
